
import * as fs from "fs";
import * as path from "path";

let dir = path.resolve().replace(/\\/g, "/");

let outputFile = `import { BuildAsm } from "file://${dir}/loader.mjs";

var option = {
	sourceFile: "代码文件",
	outputFile: "输出文件",
};

BuildAsm(option);
`

fs.writeFileSync(path.join(dir, "build.mjs"), outputFile);

outputFile = `import { BuildAsm } from "file://${dir}/loader.mjs";
BuildAsm();
`;

fs.writeFileSync(path.join(dir, "cli.mjs"), outputFile);
console.log("初始化完成");